package rpg002;

import java.awt.Graphics;
import java.awt.Image;
import java.awt.Rectangle;
import java.awt.Toolkit;

/**
 *
 * @author Smai
 * 128,24
 */
public class MenuItem extends Rectangle {

  Toolkit toolkit = Toolkit.getDefaultToolkit();
  private Image image;
  private int plusY;
  private String type;

  public MenuItem(String type, int plusY, int width, int height) {
    this.type = type;
    image = toolkit.getImage("Resources//Menu//" + type + ".png");
    this.width = width;
    this.height = height;
  }

  public void paint(Graphics gbi, int x, int y) {
    this.x = x;
    this.y = y;

    gbi.drawImage(image, x, y, null);
  }

  public String doAction() {
    return type;
  }
}
